package com.xhwl.logistics.service.cent.server;

import com.alibaba.fastjson.JSON;
import com.xhwl.common.dto.cent.vehicle.feign.VehicleAccessRecordRealtimeQuery;
import com.xhwl.logistics.bo.input.QueryVehicleAccessRecordRealtimeBO;
import com.xhwl.logistics.converter.mapstruct.VehicleAccessRecordRealtimeConverter;
import com.xhwl.logistics.service.business.VehicleAccessRecordRealtimeBusinessService;
import org.springframework.beans.factory.annotation.Autowired;

//@Service
public class VehicleAccessRecordRealtimeFeignServiceImpl implements IVehicleAccessRecordRealtimeFeignService {

    @Autowired
    private VehicleAccessRecordRealtimeConverter vehicleAccessRecordRealtimeConverter;

    @Autowired
    private VehicleAccessRecordRealtimeBusinessService vehicleAccessRecordRealtimeBusinessService;

    @Override
    public String queryAccessRecordRealtime(VehicleAccessRecordRealtimeQuery vehicleAccessRecordRealtimeQuery) {
        QueryVehicleAccessRecordRealtimeBO queryVehicleAccessRecordRealtimeBO = vehicleAccessRecordRealtimeConverter.vehicleAccessRecordRealtimeQuery2QueryVehicleAccessRecordRealtimeBO(vehicleAccessRecordRealtimeQuery);
        return JSON.toJSONString(vehicleAccessRecordRealtimeBusinessService.queryAccessRecordRealtime(queryVehicleAccessRecordRealtimeBO));
    }

}
